<!DOCTYPE html>
<html lang="zh" ng-app="resourceApp">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
        <title>全部资源</title>
        <!-- 新 Bootstrap 核心 CSS 文件 -->
        <link rel="stylesheet" href="http://apps.bdimg.com/libs/bootstrap/3.3.4/css/bootstrap.min.css">
        <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
        <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
        <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
        <script src="http://apps.bdimg.com/libs/bootstrap/3.3.4/js/bootstrap.min.js"></script>
        <script src="http://apps.bdimg.com/libs/angular.js/1.5.0-beta.0/angular.min.js"></script>

        <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
          <script src="http://apps.bdimg.com/libs/html5shiv/r29/html5.min.js"></script>
          <script src="http://apps.bdimg.com/libs/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
    </head>
    <body ng-controller="resourcesCtrl">

        <form class="container" action="">
            <div class="row">
                <div class="col-md-6 text-right">登录名：</div>
                <div class="col-md-6"><input name="username"/></div>
            </div>
            <div class="row">
                <div class="col-md-6 text-right">密码：</div>
                <div class="col-md-6"><input name="password" type="password"/></div>
            </div>
            <div class="row">
                <div class="col-md-12 text-center">
                    <button class="btn btn-primary" type="submit">登录</button>
                </div>
            </div>
        </form>
        <script type="text/javascript">
                    var app = angular.module("resourceApp", []);
                    app.controller("resourcesCtrl", function ($scope, $http) {
                        $http.get("console/resource")
                                .success(function (response) {
                                    $scope.names = response.records;
                                });
                    });
        </script>
    </body>
</html>